package com.ms.demo;

/**
 * @description: 具体观察者角色 2
 * @author: ms
 * @create: 2022-10-27 16:10
 */
public class OctalObserver extends Observer{

    public OctalObserver(Subject subject){
        this.subject = subject;
        this.subject.attach(this);
    }

    @Override
    public void update() {
        System.out.println( "八进制为: " + Integer.toOctalString( subject.getState() ) );
    }
}